package com.ktjy.mapper.user;

import com.ktjy.pojo.StorageRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface StorageRecordMapper {
    //查询入库记录表的功能
    public List<StorageRecord> getStorageRecordList(@Param("goodsName") String goodsName,
                                             @Param("supplierId") Integer supplierId,
                                             @Param("payStatus") Integer payStatus);

    //查询入库记录及供应商名称
    public List<StorageRecord> getStorageRecordListWithSupplierName(StorageRecord storageRecord);

    //使用association查询入库记录表
    public List<StorageRecord> getStorageRecordAssociationList(@Param("goodsName") String goodsName);

    //使用collection查询供货商及相关入库记录
    public List<StorageRecord> getStorageRecordCollectionList(@Param("supplierId") Integer supplierId);

    //使用foreach查询供货商列表数组
//    public List<StorageRecord> getStorageRecordBySupplierIdArray(Integer[] supplierId);
    public List<StorageRecord> getStorageRecordBySupplierIdArray(List<Integer> supplierId);

    //使用map查询入库表
    public List<StorageRecord> getStorageRecordBySupplierIdMap(Map<String, Object> supplierIdMap);

    //实现入库记录表模块的分页查询功能
    public List<StorageRecord> getStorageRecordListByPage(@Param("goodsName") String goodsName,
                                                           @Param("supplierId") Integer supplierId,
                                                           @Param("pageBegin") Integer pageBegin,
                                                           @Param("pageSize") Integer pageSize);
}
